package main;

import java.util.Date;

/**
 * The type User.
 *
 * @author hanj.cn@outlook.com
 */
public class User {

    private final String username;
    private final String deviceName;
    private Date time;
    private boolean isOnline;

    /**
     * Instantiates a new User.
     *
     * @param username   the username
     * @param deviceName the device name
     */
    public User(String username, String deviceName) {

        this.username = username;
        this.deviceName = deviceName;
    }

    /**
     * Gets username.
     *
     * @return the username
     */
    public String getUsername() {

        return username;
    }

    /**
     * Gets device name.
     *
     * @return the device name
     */
    public String getDeviceName() {

        return deviceName;
    }

    /**
     * Gets time.
     *
     * @return the time
     */
    public Date getTime() {

        return time;
    }

    /**
     * Sets time.
     *
     * @param time the time
     */
    public void setTime(Date time) {

        this.time = time;
    }

    /**
     * Is online boolean.
     *
     * @return the boolean
     */
    public boolean isOnline() {

        return isOnline;
    }

    /**
     * Sets online.
     *
     * @param online the online
     */
    public void setOnline(boolean online) {

        isOnline = online;
    }

}
